home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Schildt <- Advanced Books
- Date: 7 Mar 1996 19:48:51 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4ho3m3$iov@solutions.solon.com>
- References: <8BA8405.02C70020DE.uuout@sourcebbs.com> <danpop.826121528@rscernix> <4hleu9$5ah@solutions.solon.com> <danpop.826238706@rscernix>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <danpop.826238706@rscernix>, Dan Pop <danpop@mail.cern.ch> wrote:
- >In <4hleu9$5ah@solutions.solon.com> seebs@solutions.solon.com (Peter Seebach) writes:
- >>I consider a bug subtle if the code is likely to work correctly most of the
- >>time.
-
- >So, you consider "void main" and calling malloc without a declaration in
- >scope subtle bugs :-)
-
- Yup. They are not obvious to a casual programmer who hasn't specifically
- been warned about them. The latter especially; if you're looking at
- code in the middle of a 500+ line module, how often do you remember to
- check for relevant headers? :)
-
- I consider subtle bugs somewhat worse than obvious ones in a programming
- text. For instance, an O'Reilly book I'm using right now (a 1992 edition,
- so this is probably fixed) consistently, in code examples, spells the
- operator which compares for equality as "=^=". I assume this is a typesetting
- artifact. It is a harmless thing; no one will be misled, I suspect.
-
- The same book, at one point, declares
- char *buf[128];
- and passes the buffer to something like fgets(). I consider this much more
- serious; it is likely to slip into real code, and will not even produce a
- warning on certain oft-used and broken systems, like Sun's.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-